﻿namespace SharpTalk.Client.WpfApplication.Controls
{
    using System.Windows;
    using System.Windows.Controls;
    using System.Windows.Input;
    using Resources;

    /// <summary>
    /// Interaction logic for DialogActionsPanel.xaml
    /// </summary>
    public partial class DialogActionsPanel : UserControl
    {
        public static DependencyProperty ShowButtonOkProperty = DependencyProperty.Register("ShowButtonOk", typeof(bool), typeof(DialogActionsPanel), new PropertyMetadata((bool)false));
        public static DependencyProperty ShowButtonCancelProperty = DependencyProperty.Register("ShowButtonCancel", typeof(bool), typeof(DialogActionsPanel), new PropertyMetadata((bool)false));
        public static DependencyProperty ShowButtonYesProperty = DependencyProperty.Register("ShowButtonYes", typeof(bool), typeof(DialogActionsPanel), new PropertyMetadata((bool)false));
        public static DependencyProperty ShowButtonNoProperty = DependencyProperty.Register("ShowButtonNo", typeof(bool), typeof(DialogActionsPanel), new PropertyMetadata((bool)false));
        public static DependencyProperty ButtonOkCommandProperty = DependencyProperty.Register("ButtonOkCommand", typeof(ICommand), typeof(DialogActionsPanel));
        public static DependencyProperty ButtonCancelCommandProperty = DependencyProperty.Register("ButtonCancelCommand", typeof(ICommand), typeof(DialogActionsPanel));
        public static DependencyProperty ButtonYesCommandProperty = DependencyProperty.Register("ButtonYesCommand", typeof(ICommand), typeof(DialogActionsPanel));
        public static DependencyProperty ButtonNoCommandProperty = DependencyProperty.Register("ButtonNoCommand", typeof(ICommand), typeof(DialogActionsPanel));
        public static DependencyProperty ButtonOkContentProperty = DependencyProperty.Register("ButtonOkContent",typeof (object),typeof (DialogActionsPanel),new PropertyMetadata((string)Messages.label_ok));
        public static DependencyProperty ButtonCancelContentProperty = DependencyProperty.Register("ButtonCancelContent", typeof(object), typeof(DialogActionsPanel), new PropertyMetadata((string)Messages.label_cancel));
        public static DependencyProperty ButtonYesContentProperty = DependencyProperty.Register("ButtonYesContent", typeof(object), typeof(DialogActionsPanel), new PropertyMetadata((string)Messages.label_yes));
        public static DependencyProperty ButtonNoContentProperty = DependencyProperty.Register("ButtonNoContent", typeof(object), typeof(DialogActionsPanel), new PropertyMetadata((string)Messages.label_no));
        public static DependencyProperty ButtonOkIsEnabledProperty = DependencyProperty.Register("ButtonOkIsEnabled", typeof(bool), typeof(DialogActionsPanel), new PropertyMetadata((bool)true));
        public static DependencyProperty ButtonCancelIsEnabledProperty = DependencyProperty.Register("ButtonCancelIsEnabled", typeof(bool), typeof(DialogActionsPanel), new PropertyMetadata((bool)true));
        public static DependencyProperty ButtonYesIsEnabledProperty = DependencyProperty.Register("ButtonYesIsEnabled", typeof(bool), typeof(DialogActionsPanel), new PropertyMetadata((bool)true));
        public static DependencyProperty ButtonNoIsEnabledProperty = DependencyProperty.Register("ButtonNoIsEnabled", typeof(bool), typeof(DialogActionsPanel), new PropertyMetadata((bool)true));

        public static DependencyProperty ButtonOkIsDefaultProperty = DependencyProperty.Register("ButtonOkIsDefault", typeof(bool), typeof(DialogActionsPanel), new PropertyMetadata((bool)false));
        public static DependencyProperty ButtonCancelIsDefaultProperty = DependencyProperty.Register("ButtonCancelIsDefault", typeof(bool), typeof(DialogActionsPanel), new PropertyMetadata((bool)false));
        public static DependencyProperty ButtonYesIsDefaultProperty = DependencyProperty.Register("ButtonYesIsDefault", typeof(bool), typeof(DialogActionsPanel), new PropertyMetadata((bool)false));
        public static DependencyProperty ButtonNoIsDefaultProperty = DependencyProperty.Register("ButtonNoIsDefault", typeof(bool), typeof(DialogActionsPanel), new PropertyMetadata((bool)false));

        public DialogActionsPanel()
        {
            InitializeComponent();
        }

        public bool ShowButtonOk
        {
            get { return (bool) GetValue(ShowButtonOkProperty); }
            set { SetValue(ShowButtonOkProperty, value); }
        }
        public bool ShowButtonCancel
        {
            get { return (bool)GetValue(ShowButtonCancelProperty); }
            set { SetValue(ShowButtonCancelProperty, value); }
        }
        public bool ShowButtonYes
        {
            get { return (bool)GetValue(ShowButtonYesProperty); }
            set { SetValue(ShowButtonYesProperty, value); }
        }
        public bool ShowButtonNo
        {
            get { return (bool)GetValue(ShowButtonNoProperty); }
            set { SetValue(ShowButtonNoProperty, value); }
        }

        public ICommand ButtonOkCommand
        {
            get { return (ICommand) GetValue(ButtonOkCommandProperty); }
            set { SetValue(ButtonOkCommandProperty,value); }
        }
        public ICommand ButtonCancelCommand
        {
            get { return (ICommand)GetValue(ButtonCancelCommandProperty); }
            set { SetValue(ButtonCancelCommandProperty, value); }
        }
        public ICommand ButtonYesCommand
        {
            get { return (ICommand)GetValue(ButtonYesCommandProperty); }
            set { SetValue(ButtonYesCommandProperty, value); }
        }
        public ICommand ButtonNoCommand
        {
            get { return (ICommand)GetValue(ButtonNoCommandProperty); }
            set { SetValue(ButtonNoCommandProperty, value); }
        }

        public object ButtonOkContent
        {
            get { return GetValue(ButtonOkContentProperty); }
            set {SetValue(ButtonOkContentProperty,value);}
        }
        public object ButtonCancelContent
        {
            get { return GetValue(ButtonCancelContentProperty); }
            set { SetValue(ButtonCancelContentProperty, value); }
        }
        public object ButtonYesContent
        {
            get { return GetValue(ButtonYesContentProperty); }
            set { SetValue(ButtonYesContentProperty, value); }
        }
        public object ButtonNoContent
        {
            get { return GetValue(ButtonNoContentProperty); }
            set { SetValue(ButtonNoContentProperty, value); }
        }

        public bool ButtonOkIsEnabled
        {
            get { return (bool) GetValue(ButtonOkIsEnabledProperty);  }
            set {SetValue(ButtonOkIsEnabledProperty, value);}
        }
        public bool ButtonCancelIsEnabled
        {
            get { return (bool)GetValue(ButtonCancelIsEnabledProperty); }
            set { SetValue(ButtonCancelIsEnabledProperty, value); }
        }
        public bool ButtonYesIsEnabled
        {
            get { return (bool)GetValue(ButtonYesIsEnabledProperty); }
            set { SetValue(ButtonYesIsEnabledProperty, value); }
        }
        public bool ButtonNoIsEnabled
        {
            get { return (bool)GetValue(ButtonNoIsEnabledProperty); }
            set { SetValue(ButtonNoIsEnabledProperty, value); }
        }

        public bool ButtonOkIsDefault
        {
            get { return (bool) GetValue(ButtonOkIsDefaultProperty); }
            set { SetValue(ButtonOkIsDefaultProperty,value);}
        }
        public bool ButtonCancelIsDefault
        {
            get { return (bool)GetValue(ButtonCancelIsDefaultProperty); }
            set { SetValue(ButtonCancelIsDefaultProperty, value); }
        }
        public bool ButtonYesIsDefault
        {
            get { return (bool)GetValue(ButtonYesIsDefaultProperty); }
            set { SetValue(ButtonYesIsDefaultProperty, value); }
        }
        public bool ButtonNoIsDefault
        {
            get { return (bool)GetValue(ButtonNoIsDefaultProperty); }
            set { SetValue(ButtonNoIsDefaultProperty, value); }
        }
    }
}
